package io.github.junxworks.junx.stream.extractor;

import io.github.junxworks.junx.stream.constants.DefaultTopics;
import io.github.junxworks.junx.stream.extractor.convert.Convertor;
import lombok.Getter;
import lombok.Setter;

import java.util.Map;

/**
 * 数据抽取器上下文，只用于数据抽取
 *
 * @author 王兴
 * @date 2024/09/10
 */
@Getter
@Setter
public class ExtractContext {
    /**
     * 查询条件.
     */
    private String sql;

    /**
     * 设置文件路径
     */
    private String filePath;

    /**
     * 批次大小，集齐了往后面发送数据.
     */
    private int batchSize = 10000;

    /**
     * 发送事件名
     */
    private String outputTopic = DefaultTopics.TOPIC_DATAEXTRACT;

    private Map<String, Object> globalParams;

    private Convertor<?> convertor;
}
